package com.in.insa;

import android.R.style;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;

import com.in.R;
import com.in.insa.actorsetting.ActorSetting;
import com.in.insa.menu.Menu;
import com.in.insa.play.Play;
import com.in.utils.ErrorShow;

// 
public class MainActivityPop extends Activity{
	
	private String TAG = "MainActivityPop";
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		getWindow().requestFeature(Window.FEATURE_NO_TITLE);
		getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
		setContentView(R.layout.activity_main);
		
		ErrorShow er = new ErrorShow(this);
		
		Button btn1, btn2, btn3;
		
		btn1 = (Button)findViewById(R.id.main_btn1); // play 
		btn2 = (Button)findViewById(R.id.main_btn2); // setting
		btn3 = (Button)findViewById(R.id.main_btn3);  // menu
		
		View.OnClickListener listener = new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				switch( v.getId() ) {
				
				case R.id.main_btn1: // play..  
					Intent i1 = new Intent(MainActivityPop.this, Play.class);
					// Intent i1 = new Intent(MainActivity.this, Play.class); //test....
					i1.putExtra("gameOverKillLarge","20");
					i1.putExtra("gameOverKillMiddle","20");
					i1.putExtra("gameOverKillSmall","20");
					i1.putExtra("gameOverGold","20");
					
					startActivity(i1);
					// finish();
					break;

				case R.id.main_btn2: // cha
					Intent i2 = new Intent(MainActivityPop.this, ActorSetting.class);
					startActivity(i2);
					// finish();
					break;

				case R.id.main_btn3: // menu
					Intent i3 = new Intent(MainActivityPop.this, Menu.class);
					startActivity(i3);
					//finish();
					break;
				}
			}
		};
		
		btn1.setOnClickListener(listener); 
		btn2.setOnClickListener(listener);
		btn3.setOnClickListener(listener); 

	}

	@Override
	protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) {
    	super.onApplyThemeResource(theme, resid, first);
    	theme.applyStyle(style.Theme_Dialog, true);
    }

}	